#define VERSION_NUMBER 1
#define PROGRAM_NUMBER 32700012

struct Userdata {
  char  username[33];
  char  password[33];
  int   nsip;
};

struct RPCUser {
  char  name[33];
  char  status[33];
  char  statusmsg[1025];
  int   count;
};

struct SendMessage {
  Userdata user;
  char     data[4097];
  int      type;
};

struct GetMessage {
  char     data[4097];
  char     user[33];
  int      type;
  long int time;
};

program CT_PROG {
  version CT_VERSION {
    int        CONNECT(Userdata)    = 1;
    int        DISCONNECT(Userdata) = 2;
    int        GETEVENT(void)       = 3;
    int        STARTGETUSERS(void)  = 4;
    RPCUser    GETUSER(int)         = 5;
    int        ENDGETUSERS(int)     = 6;
    GetMessage GETMSG(void)         = 7;
    int        SENDMSG(SendMessage) = 8;
  } = VERSION_NUMBER;
} = PROGRAM_NUMBER;
